package com.woniu.command.purchasedetailcommand;

import com.woniu.command.Command;

import com.woniu.command.handle.PurchaseDetailCommandHandle;
import com.woniu.outlet.po.PurchaseDetailPo;
import com.woniu.uitl.ApplicationContextHolder;

public class AddPurchaseDetailCommand implements Command<PurchaseDetailPo,String> {

    private PurchaseDetailCommandHandle handle;

    public AddPurchaseDetailCommand() {
        this.handle = ApplicationContextHolder.getApplicationContext().getBean(PurchaseDetailCommandHandle.class);
    }

    @Override
    public String excute(PurchaseDetailPo detailPo) {
        String msg = handle.addPurDetail(detailPo);
        return msg;
    }

}
